Skip to content

ASoC: soc-acpi-intel-ptl-match: add ptl_cs42l43_agg_l3_cs35l56_l12_ghost_rt722#5754

Open
bardliao wants to merge 1 commit intothesofproject:topic/sof-devfrom
bardliao:ghost-rt722
Open

ASoC: soc-acpi-intel-ptl-match: add ptl_cs42l43_agg_l3_cs35l56_l12_ghost_rt722#5754
bardliao wants to merge 1 commit intothesofproject:topic/sof-devfrom
bardliao:ghost-rt722

Conversation

@bardliao
Copy link
Copy Markdown
Collaborator

@bardliao bardliao commented May 4, 2026

Some BIOS include a ghost ALC722 codec ADR while the hardware is not physically present. That's why we need to create an acpi mach table with empty endpoint. The ghost ALC722 codec with empty endpoint will be skipped by the machine driver.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new PTL SoundWire ACPI machine match intended to handle BIOSes that advertise a “ghost” RT722/ALC722 codec _ADR even when the device is not physically present, by providing an _ADR entry with zero endpoints so the machine driver skips it.

Changes:

  • Added a new cs42l43 aggregated _ADR table that includes an extra “ghost” RT722/ALC722 device with no endpoints.
  • Added new cs35l56 2-amp _ADR tables using spk_1..spk_4 endpoints.
  • Added a new PTL SoundWire link table + machine entry wiring these pieces together.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sound/soc/intel/common/soc-acpi-intel-ptl-match.c Outdated
Comment thread sound/soc/intel/common/soc-acpi-intel-ptl-match.c Outdated
Comment thread sound/soc/intel/common/soc-acpi-intel-ptl-match.c Outdated
Comment thread sound/soc/intel/common/soc-acpi-intel-ptl-match.c Outdated
Comment thread sound/soc/intel/common/soc-acpi-intel-ptl-match.c Outdated
Copilot AI review requested due to automatic review settings May 4, 2026 06:14
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sound/soc/intel/common/soc-acpi-intel-ptl-match.c Outdated
Comment thread sound/soc/intel/common/soc-acpi-intel-ptl-match.c Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sound/soc/intel/common/soc-acpi-intel-ptl-match.c Outdated
ujfalusi
ujfalusi previously approved these changes May 7, 2026
.adr = 0x000330025d072201ull, /* Ghost rt722 */
.num_endpoints = 0,
.endpoints = NULL,
.name_prefix = "ghost"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gah :(

{
.adr = 0x00033001FA424301ull,
.num_endpoints = ARRAY_SIZE(cs42l43_amp_spkagg_endpoints),
.endpoints = cs42l43_amp_spkagg_endpoints,
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will wait for the test result since I am not quite sure if cs42l43 amp is aggregated with cs35l56s. @charleskeepax FYI

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@charleskeepax Is there a way that we can support the same codec/amp combination but with different endpoints? To be more specific, cs42l43 with and without amp aggregated. The endpoint will be skipped by the machine driver, but the topology was selected before we check is the endpoint present.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah its not aggregated here, I think the host thinks it is because of the smart amps bits on the rt722. If we use match tables you can't tell the difference between two systems with identical parts one of which aggregates.

I kinda wonder if this match table approach is the best way to go, it makes me nervous because I don't like mixing match tables and function topologies. Feels like it introduces chances of things matching when they should actually have used function topologies. Two other approaches that I can think of:

  1. We could disable the realtek codec using a SSDT something like:
DefinitionBlock ("", "SSDT", 2, "Test", "rt722", 0x00001000)
{
    External (_SB.PC00.HDAS.IDA.SNDW.SWD0, DeviceObj)
    Scope (\_SB.PC00.HDAS.IDA.SNDW.SWD0)
    {
        Method (_STA, 0, NotSerialized)
        {
            Return (Zero)
        }
    }
}

That should make the kernel ignore the device. Leaves the kernel code the cleanest and since this is an ACPI problem perhaps its the right place to fix it? Does mean people have to install and SSDT to make the laptop work though.... so dunno.

  1. Could we do some sort of quirk thing, like the stuff in sdca_device.c? Get the core to ignore the rt722 just for this system.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@charleskeepax If the first approach is to make the change in the BIOS, I am afraid the ASIS's answer is NO. We reported this issue to ASUS and asked them to fix it in the BIOS, but there is no issue on Windows and they don't want to take any risk to change the BIOS. But, yes, I agree fixing it in the BIOS is the right and the best way to fix the issue. Or are you talking about adding a new SSDT to overwrite the existing SSDT?
Regarding the second approach , there is a similar quirk in drivers/soundwire/dmi-quirks.c. However, I guess this project is not the only product that has the issue. I think it is common is the ODM use a new audio solution but didn't remove the previous codec information from the BIOS.
Back to the PR, on second thought, we can actually use function topology with acpi match table as long as we set .sof_tplg_filename = "sof-ptl-dummy.tplg". Let's give it a try.

…ost_rt722

Some BIOS include a ghost ALC722 codec ADR while the hardware is not
physically present. That's why we need to create an acpi mach table
with empty endpoint. The ghost ALC722 codec with empty endpoint will
be skipped by the machine driver.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Closes:thesofproject#5721
Copilot AI review requested due to automatic review settings May 8, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants